package com.lqm.web.controller.admin;

import com.lqm.dao.HomeUserDao;
import com.lqm.entity.home.HomeUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @program: CrowdFunding
 * @description
 * @author: lqm
 * @create: 2018-12-03 21:25
 */
@RestController
@RequestMapping("/admin")
public class Index2Controller {
    @Autowired
    HomeUserDao homeUserDao;
    @RequestMapping("/index")
    public Map index() {
        HashMap<String, Object> map = new HashMap<String, Object>();
        List<HomeUser> homeUser = homeUserDao.findHomeUser();
        System.out.println(homeUser);
//        System.out.println(homeUser);
//        System.out.println(homeUserDao.findAll());
/*        AdminConfig web_site_title = WebConfigUtil.getAdminConfig("WEB_SITE_TITLE");
        System.out.println(web_site_title);*/
//        map.put("data",homeUser);
        map.put("a",homeUserDao.findAll());
        return map;
    }
}
